<template>
  <div>
    <h1>News</h1>
    <div>
      <p v-for="(n,i) in nws" :key="i">
        <router-link :to="`/home/news/detail?msg=${n}`">This is {{ n }}</router-link>
      </p>
      <p v-for="(n,i) in nws" :key="i+10">
        <router-link :to="{
          path:'/home/news/detail',
          query:{
            n
          }
        }">This is {{ n }}</router-link>
      </p>
      <p>
        <router-view></router-view>
      </p>
    </div>
  </div>

</template>

<script>
export default {
  name: "News",
  data() {
    return {
      nws: [
        "A1",
        "B2",
        "C3"
      ]
    }
  }
}
</script>

<style scoped>

</style>
